#ifndef ELECTRONICSCALEREALTIMECURVEPAGE_H
#define ELECTRONICSCALEREALTIMECURVEPAGE_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include "curve.h"

class ElectronicScaleRealTimeCurvePage : public QWidget
{
    Q_OBJECT
public:
    explicit ElectronicScaleRealTimeCurvePage(QWidget *parent = nullptr);
    ~ElectronicScaleRealTimeCurvePage();

protected:
    virtual void closeEvent(QCloseEvent *event) override;

public slots:
    void onParseCompleted(int id, const QVariant &var);
    void onModuleEvent(int id, const QVariant &var);

signals:

private:
    Curve           *m_curveWeight;

    QLabel          *m_lbRecordFilePath;
    QLineEdit       *m_leRecordFilePath;
    QPushButton     *m_pbSelectRecordFilePath;

    QLabel          *m_lbRecordFileName;
    QLineEdit       *m_leRecordFileName;
    QPushButton     *m_pbAutoGenerateRecordFileName;
    QPushButton     *m_pbStartRecord;
    QPushButton     *m_pbStopRecord;
    QString         m_recordPath;

    QLabel          *m_lbPeriod;
    QLineEdit       *m_lePeriod;
    QLabel          *m_lbInterval;
    QLineEdit       *m_leInterval;
    quint32         m_period; // s
    quint32         m_periodCnt;
    quint32         m_interval; // s
    quint32         m_intervalCnt;

    QPushButton     *m_pbExport; // 导出速度
    QString         m_exportPath;
};

#endif // ELECTRONICSCALEREALTIMECURVEPAGE_H
